<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		
			<!-- // 练习:
			// 书上p114 训练1 训练2 训练3
			var arr=new Array("《明史讲义》","《明代社会生活史》","《紫禁城的黄昏》","《国史十六讲》","《停滞的帝国》","《唐朝定居指南》","《明史简述》","《明史十讲》","《大明风物志》","《皇帝与秀才》");
			var telArr=new Array("1385566****","1560431****","1304316****","1516369****","1580433****","139****0431");
			var email="4006751066@qq.com"; -->
			
			<script type="text/javascript">
				
				var arr=new Array("《明史讲义》","《明代社会生活史》","《紫禁城的黄昏》","《国史十六讲》","《停滞的帝国》","《唐朝定居指南》","《明史简述》","《明史十讲》","《大明风物志》","《皇帝与秀才》");
				var telArr=new Array("1385566****","1560431****","1304316****","1516369****","1580433****","139****0431");
				var email="4006751066@qq.com";
				
				
				for(var i=0;i<arr.length;i++)
				{
					
					var book=arr[i]
					if(book.length==6){
					console.log(book)
					}
				}
				
				for(var i=0;i<telArr.length;i++)
				{
					var qq=telArr[i]
					var c=qq.indexOf("0431")
				if(c>0){
					console.log("电话号码："+qq)
				}
				}
				
				var a= email.lastIndexOf("@")
				var b=email.substr(0,a)
				console.log("QQ号："+b)
				
				
			</script>
			
			
			
	</body>
</html>
